<template>
    <Layout>
        <share-box model="content.content" :id="$page.KuERP.allContentContent[0].id"
                   :url="siteUrl+'/content/'+ this.$page.KuERP.allContentContent[0].id"/>
        <div>
            <h3 align="center">{{$page.KuERP.allContentContent[0].name}}</h3>
            <div v-html="$page.KuERP.allContentContent[0].content"/>
            <div>分类标签:
                <v-template v-for="item of $page.KuERP.allContentContent[0].mailChannelIds">
                    <v-chip>{{item.name}}</v-chip>

                </v-template>
            </div>
        </div>
    </Layout>
</template>

<page-query>
    query($domain:String!) {
    KuERP{
    allContentContent(domain:$domain) {
    name
    id
    content
    folderId{
    id
    }
    mailChannelIds{
    name
    }
    websiteMetaTitle
    websiteMetaDescription
    websiteMetaKeywords
    }
    }}

</page-query>

<script>
    import config from '../../gridsome.config';
    import ShareBox from "../components/ShareBox";

    export default {
        components: {ShareBox},
        metaInfo() {
            return {
                title: this.$page.KuERP.allContentContent[0].websiteMetaTitle || this.$page.KuERP.allContentContent[0].name,
                meta: [{name: "description", conetnt: this.$page.KuERP.allContentContent[0].websiteMetaDescription},
                    {name: "keywords", content: this.$page.KuERP.allContentContent[0].websiteMetaKeywords},
                    {"http-equiv": "X-UA-Compatible", content: "IE=edge"},
                    {
                        name: "viewport",
                        content: "width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"
                    }, {name: "apple-mobile-web-app-capable", content: "yes"},
                    {name: "apple-mobile-web-app-status-bar-style", content: "black"},
                    {name: "format-detection", content: "telephone=no"},
                    {property: "og:type", content: "website"},
                    {
                        property: "og:title",
                        content: this.$page.KuERP.allContentContent[0].websiteMetaTitle || this.$page.KuERP.allContentContent[0].name
                    },
                    {property: "og:description", content: this.$page.KuERP.allContentContent[0].websiteMetaDescription},
                    {
                        property: "og:image",
                        content: "https://www.kaikong.cn/web/image/res.company/1/logo?unique=2742a8f"
                    },
                    {
                        property: "og:url",
                        content: config.siteUrl + '/content/' + this.$page.KuERP.allContentContent[0].id
                    }]
            }
        },
        data() {
            return {
                siteUrl: config.siteUrl,
            }
        }
    };
</script>
<style>

</style>